/**
 * @ author: 汪孟苹
 */
define([],function(){
	var tpl = {};

	tpl.info = function(){
		return info();
	}
	tpl.bmiTable = function(){
		return bmiTable();
	}
	tpl.fmTable = function(){
		return fmTable();
	}
	tpl.courseTable = function(){
		return courseTable();
	}

	var info = function(){
		return 	'<script id="pregnancySelfRecord_info" type="text/html">'+
				'	<ul class="clearfix">'+
		        '        <li><span>姓名：</span><div>{{userName}}</div></li> '+
		        '        <li><span>末次月经：</span><div>{{lastMenstrualDate}}</div></li>'+
		        '        <li><span>分娩状态：</span><div>{{deliveryStatus}}</div></li> '+
		        '        <li><span>孕前体重：</span><div>{{preWeight}}kg</div></li> '+
		        '        <li><span>年龄：</span><div>{{if age}}{{age}}{{else}}暂无{{/if}}</div></li> '+
		        '        <li><span>预产期：</span><div>{{expectedDay}}</div></li> '+
		        '        <li><span>分娩日期：</span><div>{{deliveryDate}}</div></li> '+
		        '        <li><span>孕前BMI：</span><div>{{preBmi}}</div></li> '+
				'        <li><span>孕周：</span><div>{{pregnancyWeek}}</div></li> '+
				'        <li><span>手机号码：</span><div>{{phoneNo}}</div></li>'+
		        '        <li><span>分娩天数：</span><div>{{deliveryDay}}</div></li> '+
		        '    </ul>'+
				'</script>';
	}
	var bmiTable = function(){
		return 	'<script id="pregnancySelfRecord_bmiTable" type="text/html">'+
				'	<div class="line title">'+
				'		<div>日期</div>'+
				'		<div>孕周</div>'+
				'		<div>体重（kg）</div>'+
				'		<div>BMI（体质指数）</div>'+
				'		<div>与上周比体重增长(kg)</div>'+
				'		<div>与孕前比体重增长(kg)</div>'+
				'	</div>'+
				'	{{each list as value i}}'+
				'		<div class="line {{value.className}}">'+
				'			<div>{{value.recordTime}}</div>'+
				'			<div>{{value.pregnancyWeek}}</div>'+
				'			<div>{{value.weight}}</div>'+
				'			<div>{{value.bmi}}</div>'+
				'			<div>{{value.increaseWeight}}</div>'+
				'			<div>{{value.preIncreaseWeight}}</div>'+
				'		</div>'+
				'	{{/each}}'+
				'</script>';
	}
	var fmTable = function(){
		return 	'<script id="pregnancySelfRecord_fmTable" type="text/html">'+
				'	<div class="column">'+
				'		<div class="bg-blue h36 tit"></div>'+
				'		{{each days as value i}}'+
				'			<div class="bg-blue td">{{value}}</div>'+
				'		{{/each}}'+
				'	</div>'+
				'	{{each list as value i}}'+
				'		<div class="column">'+
				'			<div class="bg-blue h36">{{value.pregnancyWeek}}</div>'+
				'			{{each value.fetalmovementList as item j}}'+
				'				<div class="td">'+
				'					<div class="date">{{if item.fetalmovement}}{{item.fetalmovement.recordDate}}{{/if}}</div>'+
				'					<div class="times {{if item.fetalmovement}}{{if item.fetalmovement.times < 10}}bg-red{{else if item.fetalmovement.times < 20}}bg-yellow{{else if item.fetalmovement.times >= 30}}bg-pink{{/if}}{{/if}}">{{if item.fetalmovement}}{{item.fetalmovement.times}}{{/if}}</div>'+
				'				</div>'+
				'			{{/each}}'+
				'		</div>'+
				'	{{/each}}'+
				'</script>';
	}
	var courseTable = function(){
		return 	'<script id="pregnancySelfRecord_courseTable" type="text/html">'+
				'	<div class="line title">'+
				'		<div class="td"><div>日期</div></div>'+
				'		<div class="td"><div>课目</div></div>'+
				'		<div class="td"><div>主要内容</div></div>'+
				'		<div class="td"><div>备注</div></div>'+
				'	</div>'+
				'	{{each list as value i}}'+
				'		<div class="line">'+
				'			<div class="td"><div>{{value.recordTime}}</div></div>'+
				'			<div class="td"><div>{{value.courseName}}</div></div>'+
				'			<div class="td"><div>{{value.courseContent}}</div></div>'+
				'			<div class="td"><div>{{value.remark}}</div></div>'+
				'		</div>'+
				'	{{/each}}'+
				'</script>';
	}

	return tpl;
});